home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / bison / Makefile.orig < prev    next >
Encoding:
Makefile  |  1988-12-30  |  3.2 KB  |  101 lines

  1. # Makefile for bison
  2. #   Copyright (C) 1984 Bob Corbett and Free Software Foundation, Inc.
  3.  
  4. #BISON is distributed in the hope that it will be useful, but WITHOUT ANY
  5. #WARRANTY.  No author or distributor accepts responsibility to anyone
  6. #for the consequences of using it or for whether it serves any
  7. #particular purpose or works at all, unless he says so in writing.
  8. #Refer to the BISON General Public License for full details.
  9.  
  10. #Everyone is granted permission to copy, modify and redistribute BISON,
  11. #but only under the conditions described in the BISON General Public
  12. #License.  A copy of this license is supposed to have been given to you
  13. #along with BISON so you can know your rights and responsibilities.  It
  14. #should be in a file named COPYING.  Among other things, the copyright
  15. #notice and this notice must be preserved on all copies.
  16.  
  17. # In other words, you are welcome to use, share and improve this program.
  18. # You are forbidden to forbid anyone else to use, share and improve
  19. # what you give them.   Help stamp out software-hoarding!  */
  20.  
  21.  
  22. # For sysV, you must uncomment the following lines
  23. #CFLAGS = -g -DUSG
  24. #LIBS = -lPW
  25. #and comment out the assignment of CFLAGS below.
  26. #Also, if getopt.c gives any trouble, delete it from OBJECTS.
  27. #so the system's getopt will be used.
  28.  
  29.  
  30. DESTDIR=
  31. # where the installed binary goes
  32. BINDIR = $(DESTDIR)/usr/local/bin
  33.  
  34. # where the parsers go
  35. #PARSERDIR = $(DESTDIR)/usr/local/lib
  36. PARSERDIR = /sprite/users/rab/bison
  37.  
  38. # names of parser files
  39. PFILE = bison.simple
  40. PFILE1 = bison.hairy
  41.  
  42. # It is unwise ever to compile a program without symbols.
  43. CFLAGS = -g
  44.  
  45. PFILES = -DXPFILE=\"$(PARSERDIR)/$(PFILE)\" \
  46.      -DXPFILE1=\"$(PARSERDIR)/$(PFILE1)\"
  47.  
  48. OBJECTS = LR0.o allocate.o closure.o conflicts.o derives.o files.o    \
  49.       getargs.o gram.o lalr.o                    \
  50.       lex.o main.o nullable.o output.o print.o reader.o symtab.o    \
  51.       warshall.o                            \
  52.       getopt.o
  53.  
  54. start: bison
  55.  
  56. clean:
  57.     rm -f *.o core bison
  58.  
  59. install: bison
  60.     install bison $(BINDIR)
  61.     cp $(PFILE) $(PFILE1) $(PARSERDIR)
  62.  
  63. bison: $(OBJECTS)
  64.     $(CC) $(LDFLAGS) -o bison $(OBJECTS) $(LIBS)
  65.  
  66. dist:    bison-dist.tar bison-dist.tar.Z
  67.  
  68. .PHONY: bison-dist.tar
  69. bison-dist.tar:
  70.     tar chvf bison-dist.tar \
  71.         COPYING Makefile REFERENCES bison.1 bison.simple bison.hairy \
  72.         LR0.c allocate.c closure.c conflicts.c \
  73.         derives.c files.c getargs.c gram.c lalr.c lex.c main.c \
  74.         nullable.c output.c print.c reader.c symtab.c warshall.c \
  75.         files.h gram.h lex.h machine.h new.h state.h symtab.h types.h \
  76.         bison.cld build.com vmsgetargs.c vmshlp.mar README \
  77.         bison.texinfo bison.info* \
  78.         -C ../lib getopt.c
  79. bison-dist.tar.Z: bison-dist.tar
  80.     compress < bison-dist.tar > bison-dist.tar.Z
  81.  
  82. # This file is different to pass the parser file names
  83. # to the compiler.
  84. files.o: files.c files.h new.h gram.h
  85.     $(CC) -c $(CFLAGS) $(PFILES) files.c
  86.  
  87. LR0.o: machine.h new.h gram.h state.h
  88. closure.o: machine.h new.h gram.h
  89. conflicts.o: machine.h new.h files.h gram.h state.h
  90. derives.o: new.h types.h gram.h
  91. getargs.o: files.h
  92. lalr.o: machine.h types.h state.h new.h gram.h
  93. lex.o: files.h symtab.h lex.h
  94. main.o: machine.h
  95. nullable.o: types.h gram.h new.h
  96. output.o: machine.h new.h files.h gram.h state.h
  97. print.o: machine.h new.h files.h gram.h state.h
  98. reader.o: files.h new.h symtab.h lex.h gram.h
  99. symtab.o: new.h symtab.h gram.h
  100. warshall.o: machine.h
  101.